﻿/*! @File           : main.cpp
 *  @Brief          : 简要说明
 *  @Details       : 详细说明
 *  @Author       : wulifeng
 *  @Date          : 2023-03-01 14:37:15
 *  @Version      : v1.0
 *  @Copyright   : Copyright By wlf, All Rights Reserved
 */
#ifndef QTMATERIAL_H
#define QTMATERIAL_H

#include <QObject>
#include <QMap>



class QtMaterial : public QObject
{
    Q_OBJECT
public:
    explicit QtMaterial(QObject* parent = nullptr);
    ~QtMaterial();

    QStringList getThremes() const;
    void setThremes(const QStringList &value);

    bool  make_Style_sheet( QString &style_sheetQString,QString theme = "defalut",bool saveQss=true);

private:
    bool Init_Template();
    bool Init_Extraconf();
    bool Init_Themeconf(QString theme="defualt");
    QString replace_color(QString content, QString replace, QString color = "#0000ff");
    bool templatestrs_to_realval();
    bool gen_svg_res();
signals:


private:
    ///模板文件路径
    QString template_path;
    ///主题XML文件夹路径
    QString threme_xml_path;
    ///XML文件主题名
    QString threme_name;
    ///XML所有主题名
    QStringList thremes;
    ///扩展配置路径
    QString extra_conf_path;
    ///使用的SVG原图路径
    QString SVG_Original_path;
    ///SVG_生成路径
    QString Gen_path;

    ///模板内容
    QString template_content;

    ///模板待替换字符串
    QStringList template_strs;

    ///XML颜色表与扩展配置json内容
    QMap<QString, QString>color_extra_conf;

    ///替换->实际值
    QMap<QString, QString>templata_str_replace;

    ///生成的样式表
    QString style_sheet;

private:



};

#endif // QTMATERIAL_H
